const {
  orgID,
  appFuncID,
  profileFuncID,
  orgFuncID,
  rootID
} = require("../generator");

module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.bulkInsert(
      "t_dic",
      [
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_version_package",
          col_name: "status",
          key: "000",
          value: "待提交",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_version_package",
          col_name: "status",
          key: "001",
          value: "待审核",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_version_package",
          col_name: "status",
          key: "100",
          value: "生效中",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_version_package",
          col_name: "status",
          key: "200",
          value: "未通过",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_version_package",
          col_name: "status",
          key: "201",
          value: "已失效",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_user",
          col_name: "status",
          key: "000",
          value: "已冻结",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_user",
          col_name: "status",
          key: "001",
          value: "未冻结",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_role",
          col_name: "status",
          key: "000",
          value: "无效",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_role",
          col_name: "status",
          key: "001",
          value: "有效",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_role",
          col_name: "type",
          key: "000",
          value: "开发者",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_role",
          col_name: "type",
          key: "001",
          value: "审核人员",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_role",
          col_name: "type",
          key: "002",
          value: "管理员",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_app_version",
          col_name: "platform",
          key: "000",
          value: "安卓",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        },
        {
          id: `${Math.random() * Date.now()}`,
          table_name: "t_app_version",
          col_name: "platform",
          key: "001",
          value: "IOS",
          create_user_id: rootID,
          modify_user_id: rootID,
          create_time: new Date(),
          modify_time: new Date()
        }
      ],
      {}
    );
  },

  down: (queryInterface, Sequelize) => {
    return queryInterface.bulkDelete("t_dic", null, {});
  }
};
